package com.meilai.project.service.personnel.org;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.meilai.project.dto.personnel.org.RosterListSearchDTO;
import com.meilai.project.entity.personnel.org.Roster;
import com.meilai.project.entity.personnel.org.UserMobileRelation;
import com.meilai.project.vo.personnel.org.RosterVO;
import com.meilai.project.vo.personnel.org.UserMobileRelationVO;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * @author 张驰
 * @date 2022/1/18 9:59
 */
public interface RosterService extends IService<Roster> {

    // 获取列表
    Page<RosterVO> selectPageList(Integer current_page,
                                  Integer page_size,
                                  RosterListSearchDTO searchDTO);

    /**
     * 根据ID获取详情
     *
     * @param id
     * @return
     */
    RosterVO detail(Long id);


    /**
     * 导出员工信息
     *
     * @param ids
     * @param response
     */
    void exportExcel(List<Long> ids, HttpServletResponse response) throws IOException;

    List<RosterVO> listRegularList();

    RosterVO getOneByUserId(Long user_id);

    /**
     * 查询用户关联的手机号
     *
     * @param user_id
     * @return
     */
    List<UserMobileRelationVO> queryUserMobile(Long user_id);

    Boolean addOrEdit(UserMobileRelation relation);

    Boolean remove(Long id);

    Boolean verifyMobile(Long relation_id, String mobile);
}
